package com.design.principle.listkovsutlution.methodReturn;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: designPattern
 * @description:
 * @author: STU756
 * @create: 2021-01-19 01:28
 */
public class Child extends Base{
    @Override
    public HashMap method() {
        HashMap hashMap = new HashMap();
        System.out.println("执行子类的method");
        hashMap.put("jiajia",123);
        return hashMap;
    }

//    @Override
//    public Object method() { //报错，语法规则已经遵循了里氏替换原则
//        HashMap hashMap = new HashMap();
//        System.out.println("执行子类的method");
//        hashMap.put("jiajia",123);
//        return hashMap;
//    }
}
